package cn.edu.scau.cmi.wuzhenxin.singleton;

import java.util.HashSet;
import java.util.Set;

public class Marshall {
	private String name;
	private static Set<Marshall> marshallSet = new HashSet<Marshall>();
	
	private Marshall(String name) {
		this.setName(name);
	}
	
	
	public static Set<Marshall> addInstance(String name) {
		if(marshallSet.size()<10) {
			Marshall footballer=new Marshall(name);
			marshallSet.add(footballer);	
		}

		return marshallSet;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}
}
